package 字符流复制java文件;
/*
将IO\\字符流\\ConversionStreamDemo复制到copy.java下
 */

import java.io.*;

public class CopyJavaDemo01 {
    public static void main(String[] args) throws IOException {
        InputStreamReader isw=new InputStreamReader(new FileInputStream("D:\\javajhx\\IO\\src\\字符流\\ConversionStreamDemo.java"));
        OutputStreamWriter osw=new OutputStreamWriter(new FileOutputStream("co.java"));
        int ch;
        while((ch=isw.read())!=-1){
            osw.write(ch);
        }
       /* char[]chs=new char[1024];
        int len;
        while((len= isw.read(chs))!=-1){
            osw.write(chs,0,len);
        }*/
         isw.close();
        osw.close();

    }
}
